//
//  WFAboutQRCodeView.m
//  WisdomFarm
//
//  Created by sky on 2017/12/13.
//  Copyright © 2017年 sky. All rights reserved.
//

#import "WFAboutQRCodeView.h"

@interface WFAboutQRCodeView()

@property (nonatomic, strong) UIView *containerView;


@end

@implementation WFAboutQRCodeView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _codeView = [[UIImageView alloc] init];
        [self addSubview:_codeView];
        _containerView = [[UIView alloc] init];
        [self addSubview:_containerView];
        _iconView = [[UIImageView alloc] init];
        [_containerView addSubview:_iconView];
        _label = [[UILabel alloc] init];
        [_containerView addSubview:_label];
        
        [_codeView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.right.insets(UIEdgeInsetsZero);
        }];
        [_containerView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerX.mas_equalTo(0);
            make.top.equalTo(self.codeView.mas_bottom);
            make.bottom.offset(0);
            make.height.mas_equalTo(35);
        }];
        
        [_iconView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.left.bottom.mas_equalTo(0);
            make.right.equalTo(self.label.mas_left);
        }];
        
        [_label mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.right.bottom.mas_equalTo(0);
        }];
        
        self.iconView.contentMode = UIViewContentModeScaleAspectFit;
        
        self.label.textColor = [UIColor whiteColor];
        self.label.font = SCFontBold(14);
        
    }
    return self;
}

@end
